const path = require('path');

module.exports = {
	mode: 'production',
	entry: './src/index.ts',
	output: {
		path: path.resolve(__dirname, 'dist'),
		filename: 'llm-web-tool.js',
		library: 'WT',
		libraryTarget: 'umd'
	},
	devServer: {
		contentBase: './dist',
	},

	resolve: {
		extensions: ['.js', '.ts', '.json'],
	},
	devtool: 'source-map',// 打包出的js文件是否生成map文件（方便浏览器调试）
	module: {
		rules: [
			{ test: /\.tsx?$/, loader: "ts-loader" }
		]
	},

};